﻿using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Moon : MonoBehaviour
{
	[Header("X方向")]
	public float wx;
	public float xDistince;
	[Header("Y方向")]
	public float wy;
	public float yDistince;
	[Header("Z方向")]
	public float wz;
	public float zDistince;

	public float time = 0;
	// Update is called once per frame
	void Update()
	{
		time += Time.deltaTime;
		float x = xDistince * (float)Math.Cos(wx * time);
		float y = yDistince * (float)Math.Sin(wy * time);
		float z = zDistince * (float)Math.Cos(wz * time);
		transform.position = new Vector3(x, y, z);

	}
}
